package Day30;
import javax.management.relation.RoleInfo;
import java.time.format.TextStyle;

public class Text1 {
    public static void main(String[] args){
       AA a = new AA();
       a.work(new IIA(){
           @Override
           public void ring() {
               System.out.println("ppppp");
           }
       });


      A aa = new A(){
          @Override
          public void rring() {
              System.out.println("ooooo");
          }
      };
      aa.rring();
    }
}

interface IIA{
    public void ring();
}
class AA{
    public AA(){
    }
    public void work(IIA ia){
        ia.ring();
    }
}

abstract class A{
    public A(){

    }

    public abstract void rring();
}